/**
 * Created by hxpeng on 2017/3/24.
 */
(function () {
    'use strict';

    angular.module('App.pages', [
        'ui.router',
        'App.pages.class',
        'App.pages.member',
        'App.pages.dynamic'
    ])
        .config(routeConfig);


    function routeConfig($stateProvider,$urlRouterProvider) {
        $stateProvider.state('pageNotFound', {
            url: "/pageNotFound",
            templateUrl: 'source/pages/common/pageNotFound.html'
        });

        $urlRouterProvider.otherwise('/pageNotFound');


        //$stateProvider.state('/', {
        //    url: "/",
        //    onEnter: function ($state,LoginAccountAuth,$location) {
        //        LoginAccountAuth.getAccount()
        //            .then(function (data) {
        //                console.log(11111);
        //                if(data.memberType == 2){
        //                    $state.go("memberMenu.parentIndex");
        //                }else if(data.memberType == 1){
        //                    $state.go("memberMenu.teacherIndex");
        //                }
        //            });
        //    }
        //});
    }


})();
